<template>
  <div
    v-loading="
      loading ||
      (finishOrderInfoRef && finishOrderInfoRef.getOrderFinishInfoLoading) ||
      takeMaterialLoading ||
      applyEndOrderLoading ||
      getOrderEndStatusLoading ||
      engineerAcceptOrderLoading ||
      networkAcceptOrderLoading
    "
    class="order_detail"
    element-loading-text="加载中..."
  >
    <div v-if="orderDetail" class="header">
      <status :order-detail="orderDetail" :order-total-fee="calcOrderFeeSummary" />

      <div class="btn-group">
        <h-plain-button
          v-if="orderDetail.status === 2 && orderDetail.dispatchNetwork === 1"
          v-permission="'order_sure_network'"
          @click="handleNetworkAcceptOrder"
        >
          网点确认接单
        </h-plain-button>

        <h-plain-button
          v-if="orderDetail.status === 3 && orderDetail.dispatchEnginerrNetwork === 1"
          v-permission="'order_sure_engineer'"
          @click="handleEngineerAcceptOrder"
        >
          工程师确认接单
        </h-plain-button>
        <h-plain-button v-permission="'order_cope'" @click="onOrderCopyClick">
          复制工单信息
        </h-plain-button>
        <h-plain-button
          v-if="
            orderDetail &&
            orderDetail.workSpareStatus === 6 &&
            orderDetail.status === 3 &&
            userStore.isCurrentRoleNetwork
          "
          @click="onConfirmTakeMaterial"
        >
          确认领料
        </h-plain-button>
        <template v-if="orderDetail.status === 3 && orderDetail.engineerManagerEmp">
          <h-plain-button
            v-if="endStatus"
            v-permission="'updatet_satement'"
            @click="onShowEndDrawer"
          >
            修改结单信息
          </h-plain-button>
          <h-plain-button v-else v-permission="'apply_statement'" @click="onShowEndDrawer">
            申请结单
          </h-plain-button>
        </template>
        <btn-group
          ref="btnGroupInstance"
          :end-status="endStatus"
          :order-detail="orderDetail"
          :order-total-fee="sourceOrderTotalFee"
          :check-quote-btn-visible="isCanCheckQuote"
          :good-list="goodListInstance ? goodListInstance.goodList : []"
          @update="onBtnGroupUpdate"
          @update-cost-list="
            () => {
              onUpdateCostTable()
              getFeeList()
            }
          "
          @update-part-list="
            () => {
              onUpdatePartTable()
              getSparePartList()
            }
          "
          @update-list="updateOperationLog"
          @end-order-finish="onEndOrderFinish"
          @check-quote-finish="onCheckQuoteFinish"
          @update-settle="onBtnGroupUpdateSettle"
        />
      </div>
    </div>
    <div v-if="orderDetail" class="body">
      <div class="content_container">
        <el-scrollbar always>
          <div class="content">
            <div class="user_network_info">
              <div class="user_info">
                <user-info :order-detail="orderDetail" @update_detail="onBtnGroupUpdate" />
              </div>
              <div class="network_info">
                <network-info :order-detail="orderDetail" />
              </div>
            </div>
            <bill-info ref="billInfoInstance" />
            <div class="order_info">
              <order-info
                ref="orderInfoInstance"
                :order-detail="orderDetail"
                @update="getOrderDetailData"
              />
            </div>
            <bai-shi-info
              v-if="baishiField && !userStore.isCurrentRoleNetwork"
              :order-detail="orderDetail"
              @update="getOrderDetailData"
            />

            <!--产品信息-->
            <div class="good-list">
              <commodity
                ref="goodListInstance"
                :order-detail="orderDetail"
                @update="onGoodUpdate"
              />
            </div>

            <template v-if="orderDetail && [3, 4].includes(orderDetail.status)">
              <FinishOrderInfo ref="finishOrderInfoRef" :order-detail="orderDetail" />
            </template>

            <!--服务费用-->
            <fee-list
              ref="feeListInstance"
              :order-detail="orderDetail"
              @updated="onUpdateCostTable"
            />

            <!-- 物料列表 -->
            <spare-part-list
              v-if="orderDetail"
              ref="sparePartListInstance"
              :order-detail="orderDetail"
              @updated="onUpdatePartTable"
            />

            <!-- 总费用 -->
            <total-fee v-if="!userStore.isCurrentRoleNetwork" ref="totalFeeRef" />
          </div>
        </el-scrollbar>

        <div
          class="expand_collapse"
          :style="{ transform: `translate(${isShowSideBar ? 100 : 0}%, 100%)` }"
        >
          <el-tooltip v-if="isShowSideBar" content="收起" placement="left">
            <span class="show_btn_r" @click="isShowSideBar = false">
              <el-icon>
                <DArrowRight />
              </el-icon>
            </span>
          </el-tooltip>
          <el-tooltip v-else content="展开" placement="left">
            <span class="show_btn_l" @click="isShowSideBar = true">
              <el-icon>
                <DArrowLeft />
              </el-icon>
            </span>
          </el-tooltip>
        </div>
      </div>
      <div v-if="isShowSideBar && route.params.id" class="sidebar">
        <operation-log ref="operationLogInstance" :work-id="route.params.id" />
      </div>
    </div>

    <end-order-form-drawer
      v-if="orderDetail"
      v-model="endOrderFormDrawerVisible"
      :order-detail="orderDetail"
      :end-status="endStatus"
      :good-list="orderGoodList"
      @update="handleBtnGroupEndOrderInfoUpdate"
      @order-data-check-before-submit="handleEndOrderDrawerOrderDataCheck"
    />
  </div>
</template>

<script lang="ts" setup>
  import { computed, nextTick, onMounted, ref } from 'vue'
  import { useRoute, useRouter } from 'vue-router'
  import { getOrderDetail } from '@/api/order'
  import { DArrowLeft, DArrowRight } from '@element-plus/icons-vue'
  import Status from './components/status.vue'
  import BtnGroup from './components/btn-group/index.vue'
  import UserInfo from './components/user-info/index.vue'
  import NetworkInfo from './components/network-info.vue'
  import OrderInfo from './components/order-info/index.vue'
  import OperationLog from './components/operate-log/index.vue'
  import Commodity from './components/commodity/index.vue'
  import FeeList from './components/fee-list/Table.vue'
  import SparePartList from './components/part/Table.vue'
  import TotalFee from './components/total-fee/index.vue'
  import FinishOrderInfo from './components/finish-order-info/index.vue'
  import { HMessage, HMessageBox } from '@/components/common/message'
  import routeComponentName from '@/config/route-component-name'
  import BillInfo from './components/bill-info.vue'
  import { useUserStore } from '@/store/modules/user'
  import {
    useEngineerTakeMaterialConfirm,
    useEngineerEndOrderApply,
  } from '@/services/pages/order/useOrder'
  import BaiShiInfo from './components/baishi-info/index.vue'
  import { useGetOrderEndStatus } from '@/services/pages/order/useOrder'
  import { ElMessageBox } from 'element-plus'
  import EndOrderFormDrawer from './components/end-order-form-drawer.vue'
  import {
    useEngineerConfirmAcceptOrder,
    useNetworkConfirmAcceptOrder,
  } from '@/services/module/order/useDetail'
  import { useOrderCopy } from '@/store/modules/orderCopy'

  const { takeMaterialLoading, takeMaterial } = useEngineerTakeMaterialConfirm()
  const { applyLoading: applyEndOrderLoading } = useEngineerEndOrderApply()
  const {
    status: endStatus,
    getStatusLoading: getOrderEndStatusLoading,
    getStatus: getOrderEndStatus,
  } = useGetOrderEndStatus()
  const { engineerkAcceptOrderParam, engineerAcceptOrderLoading, engineerAcceptOrder } =
    useEngineerConfirmAcceptOrder()
  const { networkAcceptOrderParam, networkAcceptOrderLoading, networkAcceptOrder } =
    useNetworkConfirmAcceptOrder()
  const { setCopyInfo } = useOrderCopy()

  defineOptions({
    name: routeComponentName.order.orderDetail,
  })

  const baishiField = computed(() => {
    if (!orderDetail.value) return null

    try {
      return JSON.parse(orderDetail.value.thirdExtraContentJson)
    } catch (error) {
      return null
    }
  })
  const userStore = useUserStore()
  const goodListInstance = ref<InstanceType<typeof Commodity> | null>(null)
  const operationLogInstance = ref<InstanceType<typeof OperationLog> | null>(null)
  const router = useRouter()
  const endOrderFormDrawerVisible = ref(false)
  const orderInfoInstance = ref<InstanceType<typeof OrderInfo> | null>(null)
  const sparePartListInstance = ref<InstanceType<typeof SparePartList> | null>(null)
  const feeListInstance = ref<InstanceType<typeof FeeList> | null>(null)
  const totalFeeRef = ref<InstanceType<typeof TotalFee> | null>(null)
  const btnGroupInstance = ref<InstanceType<typeof BtnGroup> | null>(null)
  const finishOrderInfoRef = ref<InstanceType<typeof FinishOrderInfo> | null>(null)
  const sourceOrderTotalFee = computed(() => {
    if (totalFeeRef.value && totalFeeRef.value.orderTotalFee) {
      return totalFeeRef.value.orderTotalFee
    }

    return {
      engineerFeeSettlement: {
        orderSettlementPrice: 0,
        serviceFee: 0,
        spareFee: 0,
      },
      networkFeeSettlement: {
        orderSettlementPrice: 0,
        serviceFee: 0,
        spareFee: 0,
      },
      platformFeeSettlement: {
        orderSettlementPrice: 0,
        serviceFee: 0,
        spareFee: 0,
      },
      customerFeeSettlement: {
        orderSettlementPrice: 0,
        serviceFee: 0,
        spareFee: 0,
      },
    }
  })
  const calcOrderFeeSummary = computed(() => {
    if (!totalFeeRef.value) {
      return 0
    }

    if (!totalFeeRef.value.orderTotalFee) {
      return 0
    }

    if (!totalFeeRef.value.orderTotalFee.customerFeeSettlement) {
      return 0
    }

    if (!totalFeeRef.value.orderTotalFee.platformFeeSettlement) {
      return 0
    }

    const { serviceFee: customerServiceFee, spareFee: customerSparePartFee } =
      totalFeeRef.value.orderTotalFee.customerFeeSettlement
    const { serviceFee: platFormServiceFee, spareFee: platFormSparePartFee } =
      totalFeeRef.value.orderTotalFee.platformFeeSettlement

    return customerServiceFee + customerSparePartFee + platFormServiceFee + platFormSparePartFee
  })
  const route = useRoute()
  const billInfoInstance = ref<InstanceType<typeof BillInfo> | null>(null)
  const orderDetail = ref<OrderDetail | null>(null)
  const feeList = computed(() => {
    // if (feeListInstance.value) {
    // return feeListInstance.value.getFeeList
    // }
    return []
  })
  const sparePartList = computed(() => {
    // if (sparePartListInstance.value) {
    // return sparePartListInstance.value.getSparePartList
    // }
    return []
  })
  const isCanCheckQuote = computed(() => {
    const feeWaitCheckList = feeList.value.filter((item) => item.status === 1)
    const sparePartWaitCheckList = sparePartList.value.filter((item) => item.status === 1)

    if (feeList.value.length > 0 && sparePartList.value.length > 0) {
      return feeWaitCheckList.length > 0 && sparePartWaitCheckList.length > 0
    }

    return feeWaitCheckList.length > 0 || sparePartWaitCheckList.length > 0
  })
  const isShowSideBar = ref(false)
  const loading = ref(false)
  const workNo = ref('')
  const orderGoodList = computed(() => {
    if (!goodListInstance.value) {
      return []
    }

    return goodListInstance.value.goodList
  })

  const updateOrderTotalFee = () => {
    if (totalFeeRef.value && route.params.id) {
      totalFeeRef.value.getOrderTotalFeeFn(route.params.id as string)
    }
  }

  const onBtnGroupUpdateSettle = () => {
    updateOperationLog()
    updateOrderTotalFee()
  }

  const onGoodUpdate = () => {
    updateOperationLog()
  }

  const onConfirmTakeMaterial = async () => {
    const res = await takeMaterial(orderDetail.value.id)
    if (res.code === 20000) {
      HMessage.success('确认领料成功')
      updateOperationLog()
      getOrderDetailData()
      getSparePartList()
      return
    }
    HMessageBox.error(res.message)
  }

  const onCheckQuoteFinish = () => {
    updateOperationLog()
    getSparePartList()
    getFeeList()
    getOrderDetailData()
    if (totalFeeRef.value && route.params.id) {
      totalFeeRef.value.getOrderTotalFeeFn(route.params.id as string)
    }
  }

  const getBillInfo = () => {
    if (billInfoInstance.value && orderDetail.value && orderDetail.value.id) {
      billInfoInstance.value.getInfo(orderDetail.value.id)
    }
  }

  const updateOperationLog = () => {
    if (operationLogInstance.value) {
      operationLogInstance.value.getList(1)
    }
  }

  /**
   * 获取配件列表
   */
  const getSparePartList = () => {
    if (sparePartListInstance.value && orderDetail.value) {
      sparePartListInstance.value.getList(orderDetail.value.id)
    }
  }

  const getFeeList = () => {
    if (feeListInstance.value) {
      feeListInstance.value.getFees()
    }
  }

  const onUpdateCostTable = () => {
    if (btnGroupInstance.value) {
      btnGroupInstance.value.getWaitHandleEventList()
    }

    updateOperationLog()

    if (totalFeeRef.value && route.params.id) {
      totalFeeRef.value.getOrderTotalFeeFn(route.params.id as string)
    }

    if (btnGroupInstance.value && route.params.id) {
      btnGroupInstance.value.getOrderwaitHanldeList(route.params.id as string)
    }
  }

  const onUpdatePartTable = () => {
    if (btnGroupInstance.value) {
      btnGroupInstance.value.getWaitHandleEventList()
    }

    getOrderDetailData()
    updateOperationLog()

    if (totalFeeRef.value && route.params.id) {
      totalFeeRef.value.getOrderTotalFeeFn(route.params.id as string)
    }
  }

  const onBtnGroupUpdate = () => {
    getOrderDetailData()
    updateOperationLog()
  }

  const handleBtnGroupEndOrderInfoUpdate = async () => {
    getOrderDetailData()
    updateOperationLog()
    if (orderDetail.value && orderDetail.value.id) {
      await getOrderEndStatus(orderDetail.value.id)
    }
    getEndOrderInfo()
  }

  const onEndOrderFinish = () => {
    onBtnGroupUpdate()
    if (btnGroupInstance.value && route.params.id) {
      btnGroupInstance.value.getOrderwaitHanldeList(route.params.id as string)
    }
  }

  const getOrderDetailData = async () => {
    try {
      loading.value = true
      const res = await getOrderDetail(route.params.id as string)
      loading.value = false
      if (res.data.code === 20000) {
        orderDetail.value = res.data.data.row
        workNo.value = res.data.data.row.orderNo
      } else {
        HMessageBox.error(res.data.message)
      }
    } catch (error) {
      loading.value = false
      HMessageBox.error('获取工单详情失败，请稍后重试')
    }
  }

  const getEndOrderInfo = () => {
    if (orderDetail.value && orderDetail.value.id && finishOrderInfoRef.value) {
      finishOrderInfoRef.value.getOrderFinishInfo(orderDetail.value.id)
    }
  }

  /**
   * 工单复制点击事件
   */
  const onOrderCopyClick = () => {
    if (orderDetail.value && goodListInstance.value) {
      setCopyInfo(orderDetail.value, goodListInstance.value.goodList)
      router.push('/order/new')
    }
  }

  /**
   * 申请结单点击事件
   */
  const onShowEndDrawer = () => {
    endOrderFormDrawerVisible.value = true
  }

  const handleEndOrderDrawerOrderDataCheck = (value: {
    faultTypeVoid: boolean
    goodNoSnCode: boolean
  }) => {
    if (!orderInfoInstance.value || !goodListInstance.value) {
      return
    }

    if (value.faultTypeVoid) {
      HMessageBox.error('故障类型(反馈故障)不能为空')
      orderInfoInstance.value.showUpdateOrderInfoDrawer()
    }

    if (value.goodNoSnCode) {
      HMessageBox.error('产品的条码不能为空')
      const goodListDiv = document.querySelector('.good-list')
      if (goodListDiv) {
        goodListDiv.scrollIntoView({ behavior: 'smooth', block: 'start' })
      }
    }
  }

  const handleNetworkAcceptOrder = async () => {
    networkAcceptOrderParam.value = {
      id: orderDetail.value.id,
      networkId: orderDetail.value.networkId === '0' ? '' : orderDetail.value.networkId,
    }
    const res = await networkAcceptOrder()
    if (res.code === 20000) {
      HMessage.success('接单完成')
      getOrderDetailData()
      return
    }
    HMessageBox.error(res.message)
  }

  const handleEngineerAcceptOrder = async () => {
    engineerkAcceptOrderParam.value = {
      id: orderDetail.value.id,
      networkId: orderDetail.value.networkId === '0' ? '' : orderDetail.value.networkId,
      engineerId: orderDetail.value.networkId === '0' ? '' : orderDetail.value.networkId || '',
    }
    const res = await engineerAcceptOrder()
    if (res.code === 20000) {
      HMessage.success('接单完成')
      getOrderDetailData()
      return
    }
    HMessageBox.error(res.message)
  }

  onMounted(async () => {
    if (route.params.id) {
      await getOrderDetailData()
      getSparePartList()
      getBillInfo()
      getFeeList()

      await nextTick()
      if (orderInfoInstance.value) {
        orderInfoInstance.value.getWorkSourceList()
      }
      if (btnGroupInstance.value) {
        await btnGroupInstance.value.getOrderwaitHanldeList(route.params.id as string)
      }
      if (orderDetail.value && orderDetail.value.id) {
        await getOrderEndStatus(orderDetail.value.id)
      }
      updateOrderTotalFee()
      getEndOrderInfo()
      updateOperationLog()
    }
  })
</script>

<style lang="scss" scoped>
  :deep(.el-collapse-item__arrow) {
    display: none;
  }

  .order_detail {
    width: 100%;
    height: calc(100vh - 90px);
    overflow: auto;
    box-sizing: border-box;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;

    .header {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      box-sizing: border-box;
      background-color: #fff;
      padding: 12px;

      .btn-group {
        display: flex;
        column-gap: 5px;
      }
    }

    .body {
      width: 100%;
      height: calc(100% - 64px);
      display: flex;
      gap: 4px;

      .content_container {
        min-width: calc(100% - 12px - 360px);
        position: relative;
        height: 100%;

        .content {
          height: 100%;
          overflow-y: auto;
          display: flex;
          flex-direction: column;
          column-gap: 4px;
          row-gap: 4px;

          &::-webkit-scrollbar {
            display: none;
          }
        }

        .expand_collapse {
          position: absolute;
          z-index: 99;
          right: 0;
          top: 0;
          cursor: pointer;
          width: 18px;
          height: 32px;
          display: flex;
          align-items: center;
          justify-content: center;

          .show_btn_r {
            background-color: #fff;
            padding: 0 3px;
            box-shadow: 4px 0 4px 2px #e4e7ed;
            border-radius: 0 8px 8px 0;
            line-height: 32px;
            height: 32px;
            display: flex;
            justify-content: center;
            align-items: center;
          }

          .show_btn_l {
            display: flex;
            justify-content: center;
            align-items: center;
            background-color: #fff;
            padding: 0 3px;
            box-shadow: -4px 0 8px 2px #e4e7ed;
            border-radius: 8px 0 0 8px;
            line-height: 32px;
            height: 32px;
          }
        }

        .user_network_info {
          display: flex;
          gap: 4px;

          .user_info,
          .network_info {
            width: calc((100% - 12px) / 2);
            background-color: #fff;
            padding: 16px;
          }
        }

        .order_info {
          background-color: #fff;
          padding: 16px;
          width: calc(100% - 32px);
        }
      }

      .sidebar {
        min-width: 360px;
        height: 100%;
        background-color: #fff;
        padding: 12px;
        box-sizing: border-box;
      }
    }
  }

  :deep(.el-tag) {
    border: none;
  }

  .space {
    margin-top: 60px;
    position: relative;
  }

  .pt5 {
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 5px;
  }

  .pt10 {
    padding-top: 10px;
  }

  .mt10 {
    margin-top: 10px;
  }

  .mb10 {
    margin-bottom: 10px;
  }

  .mt20 {
    margin-top: 20px;
  }

  .title {
    h4 {
      line-height: 30px;
      color: #333333;
      font-size: 15px;
    }
  }

  .title_bl {
    border-left: #007cff solid 3px;
    padding-left: 5px;
    font-size: 14px;
  }

  .ord_dis {
    display: flex;
    justify-content: center;
    align-items: center;

    .img {
      width: 14px;
      height: 14px;
      margin-left: 20px;
      cursor: pointer;
    }
  }

  :deep(.el-table) {
    .number {
      color: #007cff;
      cursor: pointer;

      &:hover {
        text-decoration: underline;
      }
    }

    .cell {
      // text-align: center;
      font-size: 12px;
    }

    //th.el-table__cell + th.el-table__cell {
    //  .cell {
    //    border-left: 1px solid #e7e3e3;
    //  }
    //}
  }

  // :deep(.el-table--border .el-table__cell) {
  //border-right: none;
  // }

  .waiting_x {
    padding: 2px 4px;
    font-size: 12px;
    border-radius: 2px;
    height: 14px;
    line-height: 12px;
    color: #ffffff;
    background-color: #e69103;
    cursor: pointer;
  }

  .waiting_pass {
    padding: 2px 4px;
    font-size: 12px;
    border-radius: 2px;
    height: 14px;
    line-height: 12px;
    color: #ffffff;
    background-color: #a6a6a6;
    cursor: not-allowed;
  }

  .text-color {
    color: #007cff !important;

    &:hover {
      text-decoration: underline;
      cursor: pointer;
    }
  }

  .pagination {
    display: flex;
    margin-top: 10px;
    justify-content: end;
  }

  :deep(.el-tabs--border-card > .el-tabs__header) {
    .el-tabs__item {
      color: #000;
      font-size: 12px;
    }
  }

  .basic_information {
    padding: 12px 8px 0;

    :deep(.el-form-item__label) {
      color: #000000c9;
      font-size: 12px;
      height: 23px;
      line-height: 23px;
    }

    :deep(.el-form-item--default .el-form-item__content) {
      line-height: 23px;
    }

    .ml {
      font-size: 12px;
      color: #999;
    }

    .content_msg {
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
      word-wrap: break-word;
      word-break: break-all;
    }
  }

  .right_side {
    margin-right: 12px;

    :deep(.el-tabs__item.is-active) {
      color: #007cff !important;
    }

    :deep(.el-tabs__nav-wrap::after) {
      height: 1px;
    }

    :deep(.el-tabs__nav .el-tabs__active-bar) {
      background-color: #007cff;
      padding: 0 10px;
      position: absolute;
      bottom: 0;
      left: -10px;
    }

    :deep(.el-tabs__nav .el-tabs__item:hover) {
      color: #007cff;
    }
  }

  .pro_dra {
    :deep(.el-input .el-input__wrapper) {
      box-shadow: 0 0 0 2px transparent;
      height: 40px;
      background-color: #f4f5f5;
      box-sizing: border-box;
    }

    :deep(.el-textarea__inner) {
      box-shadow: 0 0 0 2px transparent;
      background-color: #f4f5f5;
      font-size: 12px;
    }
  }

  :deep(.el-drawer__header) {
    margin-bottom: 0;
  }

  .ul_timeline {
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;

    /* IE 10+ */
    ::-webkit-scrollbar {
      display: none;
      /* Chrome Safari */
    }

    .first_pane {
      max-height: 72vh;
      overflow-y: auto;
    }
  }

  .footer {
    margin-top: 40px;
    display: flex;
    align-items: center;
    justify-content: flex-end;

    .btn-save {
      border-color: #00c0c0;
      background-color: #00c0c0;
    }

    .btn-cancel {
      color: #383838;
      border-color: #a6a6a6;
      background-color: transparent;
    }
  }

  .el-tag.el-tag--success {
    --el-tag-text-color: #00c0c0;
    --el-tag-bg-color: #ebf6f6;
    --el-tag-border-color: #ebf6f6;
    --el-tag-hover-color: #00c0c0;
  }

  .el-tag.el-tag--info {
    --el-tag-border-color: var(--el-color-info-light-9);
  }

  .el-tag {
    --el-tag-border-color: var(--el-color-primary-light-9);
  }

  .el-tag.el-tag--warning {
    --el-tag-border-color: var(--el-color-warning-light-9);
  }
</style>
